package com.tianyu.inspection.common.enums;

/**********************************
 * @Author YSW
 * @Description 接口返回枚举类型
 * @Date 2021/1/7 - 11:55
 **********************************/

public enum RoState {
    SUCCESS(200, "操作成功"),
    FAIL(-200, "操作失败"),
    USER_LOGOUT_ERROR(-201, "异常退出登录"),
    PROJECT_NO_PERMISSIONS(-202, "项目权限不允许"),
    REQUEST_HEADERS_ERROR(-203, "请求头信息不完整"),
    PARAMS_MISS_ERROR(-204, "提交参数有问题, 请核实"),
    SMS_SEND_TOO_FAST(-205, "消息发送频率太快了"),
    SYS_SERVER_ERROR(-500, "服务器内部错误, 无法完成请求"),

    WEBSOCKET_SUCCESS(100, "操作成功"),
    WEBSOCKET_FAIL(-100, "操作失败"),
    WEBSOCKET_REGISTER_PARAM_ERROR(-101, "缺少参数, WebSocket注册失败"),
    WEBSOCKET_REGISTER_TOKEN_ERROR(-102, "Token错误, WebSocket注册失败"),
    WEBSOCKET_REPEAT_REGISTRATION_ERROR(-103, "重复注册"),
    WEBSOCKET_HEARTBEAT_PARAM_ERROR(-104, "心跳包缺少参数"),
    WEBSOCKET_HEARTBEAT_OVERTIME(-105, "心跳超时, 关闭WebSocket连接");

    private int value;
    private String message;

    RoState(int value, String message) {
        this.value = value;
        this.message = message;
    }

    public int getValue() {
        return this.value;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setValue(int value) {
        this.value = value;
    }
}
